package com.nuoniu.sibanyun.entity.crm;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 商品订单
 * </p>
 *
 * @author baiqiang
 * @since 2020-07-17
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("crm_goods_order")
@ApiModel(value="CrmGoodsOrder对象", description="商品订单")
public class CrmGoodsOrder extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公司id")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "公司名称")
    @TableField("company_name")
    private String companyName;

    @ApiModelProperty(value = "订单业务类型 商品订单：Goods ( 废弃=》》》购买通用分钟数：GeneralMinutes 保证金充值:Deposit  保证金扣费 DeDeposit) ")
    @TableField("order_business_type")
    private String orderBusinessType = "Goods";

    @ApiModelProperty(value = "密钥id")
    @TableField("secret_key_id")
    private Integer secretKeyId;

    @ApiModelProperty(value = "密钥")
    @TableField("secret_key")
    private String secretKey;

    @ApiModelProperty(value = "订单号")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty(value = "商品id")
    @TableField("goods_id")
    private Integer goodsId;

    @ApiModelProperty(value = "商品名称")
    @TableField("goods_name")
    private String goodsName;

    @ApiModelProperty(value = "商品详情")
    @TableField("goods_detail")
    private String goodsDetail;


    @ApiModelProperty(value = "商品价格")
    @TableField("price")
    private BigDecimal price;

    @ApiModelProperty(value = "折扣率")
    @TableField("discount_rate")
    private Integer discountRate;

    @ApiModelProperty(value = "售卖价格")
    @TableField("sale_price")
    private BigDecimal salePrice;

    @ApiModelProperty(value = "用户数")
    @TableField("users")
    private Integer users;

    @ApiModelProperty(value = "年限")
    @TableField("years")
    private Integer years;

    @ApiModelProperty(value = "订单状态 0未付款 1已付款 ")
    @TableField("order_status")
    private Integer orderStatus;

    @ApiModelProperty(value = "状态0正常 1删除 2停用")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "订单类型1购买 2升级 3.续费")
    @TableField("order_type")
    private Integer orderType;

    @ApiModelProperty(value = "支付类型1支付宝 2微信 3余额 4.其他")
    @TableField("pay_type")
    private Integer payType;

    @ApiModelProperty(value = "支付时间")
    @TableField("pay_date")
    private LocalDateTime payDate;

    @ApiModelProperty(value = "创建用户id")
    @TableField("create_user_id")
    private Integer create_user_id;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_date")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "分享人")
    @TableField(exist = false)
    private String shareUserName;

    @ApiModelProperty(value = "开始时间")
    @TableField(exist = false)
    private String startTime;

    @ApiModelProperty(value = "结束时间")
    @TableField(exist = false)
    private String endTime;


}
